<?php
namespace app\api\controller;

use app\api\controller\BaseController;

class TaskController extends BaseController{


	//发布任务
	public function publishTask(){
		$data = model('Task')->publishTask();
		return $data;
	}

	//发布任务
	public function hangoutTask(){
		$data = model('Task')->hangoutTask();
		return json($data);
	}

	//获取任务列表
	public function getTaskList(){
		$data = model('Task')->getTaskList();
		return json(['code'=>1,'data'=>$data]);
	}

	//获取任务信息
	public function getTaskinfo(){
		$data = model('Task')->getTaskinfo();
		return json(['code'=>1,'data'=>$data]);
	}

	//收藏/取消收藏任务信息
	public function collectTask(){
		$data = model('Task')->collectTask();
		return $data;
	}

	//获取任务类型列表
	public function getTaskClassList(){
		$data = model('TaskClass')->getTaskClassList();
		return json($data);
	}

	//撤销任务
	public function revokeTask(){
		$data = model('Task')->revokeTask();
		return json($data);
	}

	//领取任务
	public function receiveTask(){
		$data = model('Task')->receiveTask();
		return json($data);
	}

    public function royTask(){
        $data = model('Task')->royTask();
        return json($data);
    }

    public function payTask(){
        $data = model('Task')->payTask();
        return json($data);
    }

	//领取的任务列表
	public function taskOrderlist(){
		$data = model('Task')->taskOrderlist();
		return json($data);
	}

	//领取的任务信息
	public function taskOrderInfo(){
		$data = model('Task')->taskOrderInfo();
		return json($data);
	}

	//提交审核
	public function taskOrderSubmit(){
		$data = model('Task')->taskOrderSubmit();
		return json($data);
	}

	//审核
	public function taskOrderTrial(){
		$data = model('Task')->taskOrderTrial();
		return json($data);
	}
	//审核
	public function taskzy(){
		$data = model('Task')->taskzy();
		return json($data);
	}
}
